package com.huangkailong.designpattern.composite.safe;

/**
 * 安全组合模式测试.
 *
 * @author huangkl
 * @since 1.0.0
 */
public class Client {
    /**
     * main.
     */
    public static void main(String[] args) {
        Folder documents = new Folder("documents");
        documents.addFileInfo(new File("测试1.txt"));
        documents.addFileInfo(new File("测试2.txt"));
        Folder images = new Folder("images");
        documents.addFileInfo(images);
        images.addFileInfo(new File("测试1.png"));
        images.addFileInfo(new File("测试2.png"));
        documents.addFileInfo(new File("测试3.txt"));
        documents.showInfo(0);
    }
}
